import request from '@/utils/request'

  
  export const list = (query) => {
    return request({
      url: '/engine/ruleengine/page',
      method: 'get',
      params: query
    })
  }
  
  
  export const getObj = (id) => {
    return request({
      url: '/engine/ruleengine/' + id,
      method: 'get'
    })
  }
  
  export const addObj = (obj) => {
    return request({
      url: '/engine/ruleengine',
      method: 'post',
      data: obj
    })
  }
  
  export const updateObj = (obj) => {
    return request({
      url: '/engine/ruleengine',
      method: 'put',
      data: obj
    })
  }
  
  export const delObj = (id) => {
    return request({
      url: '/engine/ruleengine/' + id,
      method: 'delete'
    })
  }


//状态变更
export const updatestatus = (obj) => {
  return request({
    url: '/engine/ruleengine/updatestatus',
    method: 'put',
    data: obj
  })
}
//通过路由id更新路由规则配置
export const updatejson = (obj) => {
  return request({
    url: '/engine/ruleengine/updatejson',
    method: 'post',
    data: obj
  })
}